import Cookies from 'js-cookie'

export default {
  get () {
    return Cookies.get('token')
  },
  set (token, expires) {
    if (!expires) {
      expires = 7 // 7 days
    }
    Cookies.set('token', token, {
      expires: expires
    })
  },
  remove () {
    Cookies.remove('token')
  }
}
